* New URL syntaxes for Special:ListUsers - 'Special:ListUsers/USER' and
'Special:ListUsers/GROUP/USER', in addition to the older syntax
'Special:ListUsers/GROUP' where GROUP is a valid group name.
-* Configurable er-namespace and per-page notices for the edit form,
+* Configurable per-namespace and per-page notices for the edit form,
respectively MediaWiki:Editnotice-# where # is the namespace number, and
MediaWiki:Editnotice-#-PAGENAME where # is the page's namespace number and
PAGENAME is the page name minus the namespace prefix.
addition to body text.
* Navigation links to images available from a shared repository (like Commons)
from their local talk pages no longer appear as redlinks
-* Action=purge on ForeignApiFiles now works (purges their thumbnails and description
- pages).
-
+* Action=purge on ForeignApiFiles now works (purges their thumbnails and
+ description pages).
+* (bug 15303) Title conversion for templates wasn't working in some cases.
=== API changes in 1.14 ===
$titleText = $title->getPrefixedText();
# Check for language variants if the template is not found
if($wgContLang->hasVariants() && $title->getArticleID() == 0){
- $wgContLang->findVariantLink($part1, $title);
+ $wgContLang->findVariantLink( $part1, $title, true );
}
# Do infinite loop check
if ( !$frame->loopCheck( $title ) ) {
$titleText = $title->getPrefixedText();
# Check for language variants if the template is not found
if($wgContLang->hasVariants() && $title->getArticleID() == 0){
- $wgContLang->findVariantLink($part1, $title);
+ $wgContLang->findVariantLink( $part1, $title, false );
}
if ( !$title->isExternal() ) {
function parserConvert($t, $p) {return $t;}
function getVariants() { return array( $this->mLang->getCode() ); }
function getPreferredVariant() {return $this->mLang->getCode(); }
- function findVariantLink(&$l, &$n) {}
+ function findVariantLink(&$l, &$n, $forTemplate = false) {}
function getExtraHashOptions() {return '';}
function getParsedTitle() {return '';}
function markNoConversion($text, $noParse=false) {return $text;}
* @param $nt Mixed: the title object of the link
* @return null the input parameters may be modified upon return
*/
- function findVariantLink( &$link, &$nt ) {
- $this->mConverter->findVariantLink($link, $nt);
+ function findVariantLink( &$link, &$nt, $forTemplate = false ) {
+ $this->mConverter->findVariantLink($link, $nt, $forTemplate );
}
/**
* @return null the input parameters may be modified upon return
* @public
*/
- function findVariantLink( &$link, &$nt ) {
+ function findVariantLink( &$link, &$nt, $forTemplate = false ) {
global $wgDisableLangConversion, $wgDisableTitleConversion, $wgRequest, $wgUser;
$isredir = $wgRequest->getText( 'redirect', 'yes' );
$action = $wgRequest->getText( 'action' );
$ns=NS_MAIN;
- if ( $disableLinkConversion || $isredir == 'no' || $action == 'edit' || $action == 'submit'
- || $linkconvert == 'no' || $wgUser->getOption('noconvertlink') == 1 ) {
+ if ( $disableLinkConversion || ( !$forTemplate && ( $isredir == 'no' || $action == 'edit'
+ || $action == 'submit' || $linkconvert == 'no' || $wgUser->getOption('noconvertlink') == 1 ) ) ) {
return;
}
* names as they were
* - do not try to find variants for usernames
*/
- function findVariantLink( &$link, &$nt ) {
+ function findVariantLink( &$link, &$nt, $forTemplate = false ) {
// check for user namespace
if(is_object($nt)){
$ns = $nt->getNamespace();
}
$oldlink=$link;
- parent::findVariantLink($link,$nt);
- if($this->getPreferredVariant()==$this->mMainLanguageCode)
+ parent::findVariantLink( $link, $nt, $forTemplate );
+ if( $this->getPreferredVariant()==$this->mMainLanguageCode )
$link=$oldlink;
}
* names as they were
* - do not try to find variants for usernames
*/
- function findVariantLink( &$link, &$nt ) {
+ function findVariantLink( &$link, &$nt, $forTemplate = false ) {
// check for user namespace
if(is_object($nt)){
$ns = $nt->getNamespace();
}
$oldlink=$link;
- parent::findVariantLink($link,$nt);
- if($this->getPreferredVariant()==$this->mMainLanguageCode)
+ parent::findVariantLink( $link, $nt, $forTemplate );
+ if( $this->getPreferredVariant() == $this->mMainLanguageCode )
$link=$oldlink;
}
* names as they were
* - do not try to find variants for usernames
*/
- function findVariantLink( &$link, &$nt ) {
+ function findVariantLink( &$link, &$nt, $forTemplate = false ) {
// check for user namespace
if(is_object($nt)){
$ns = $nt->getNamespace();
}
$oldlink=$link;
- parent::findVariantLink($link,$nt);
+ parent::findVariantLink( $link, $nt, $forTemplate );
if($this->getPreferredVariant()==$this->mMainLanguageCode)
$link=$oldlink;
}